import Vue from 'vue'
import VueRouter from 'vue-router'

const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error => error)
}

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '',
    component: () => import('../views/login/Login')
  },
  {
    path: '/manage',
    name: 'manage',
    component: () => import('../views/manage/Manage')
  },
]

const router = new VueRouter({
  routes: routes
})

export default router
